﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Smart
{
  public partial class frmInputBox : Form
  {
    public frmInputBox()
    {
      InitializeComponent();
    }

    private void btnOk_Click(object sender, EventArgs e)
    {
      if (txtSifre.Text == "2520")
      {
        this.DialogResult = DialogResult.OK;
      }
      else
        MessageBox.Show("Şifre Yanlış !");
    }

    private void btnCancel_Click(object sender, EventArgs e)
    {
      this.DialogResult = DialogResult.Abort;
    }

    private void txtSifre_KeyDown(object sender, KeyEventArgs e)
    {
      if (e.KeyCode == Keys.Enter)
      {
        if (txtSifre.Text == "2520")
        {
          this.DialogResult = DialogResult.OK;
        }
        else
          MessageBox.Show("Şifre Yanlış !");
      }
    }

    private void frmInputBox_Load(object sender, EventArgs e)
    {
      txtSifre.Focus();
    }
  }
}